home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 009a / snpd0493.zip / CPUCHECK.ASM < prev    next >
Assembly Source File  |  1993-04-05  |  721b  |  19 lines

  1. .I 46 16
  2.         .386                            ; enable 386 instructions
  3.  
  4.         pushfd                          ; save extended flags
  5.         mov     eax,040000h
  6.         push    eax                     ; push 40000h onto stack
  7.         popfd                           ; pop extended flags
  8.         pushfd                          ; push extended flags
  9.         pop     eax                     ; put in eax
  10.         and     eax,040000h             ; is bit 18 set?
  11.         jne     _486                    ; yes, it's a 486
  12.         mov     ax,386                  ; no, it's a 386
  13.         jmp     _386x
  14. _486:
  15.         mov     ax,486
  16. _386x:
  17.         popfd                           ; clean the stack
  18. .D 47 1
  19.